$(function () {
    slidebar();
})

function slidebar(){
    $.post({
        url: baseurl+api.slidebar,
        success: function (res) {
            $("#imgurl").attr("src",res.data.imgurl);
            $("#name").html(res.data.name);
            $("#description").html(res.data.description);
            $("#articlecount").html(res.data.articleCount);
            $("#categoriescount").html(res.data.categoriesCount);
            $("#tagscount").html(res.data.tagscount);
            $("#pv").html(res.data.pv);
            var s="";
            $.each(res.data.friends,function (index, friend) {
                s+="<ul class=\"links-of-blogroll-list\">\n" +
                    "                            <li class=\"links-of-blogroll-item\"><a href='"+friend.url+"' title=\"\" target=\"_blank\">"+friend.name+"</a></li>\n" +
                    "                        </ul>";
            })
            $("#friend").html(s);
        }
    });
}